using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for RepeaterHelper
/// </summary>
public partial class ControlHelper
{

    public int FillDataTableToRepeater(
        Repeater repeater )
    {
        int totalRecord = 0;
        DataTable dataTable =
        sqlServerProvider.GetDataTable( );
        if (dataTable != null)
        {
            repeater.DataSource = dataTable;
            totalRecord = dataTable.Rows.Count;
        }
        else
            repeater.DataSource = null;
        repeater.DataBind();
        return totalRecord;
    }
    
    public int FillDataTableToRepeater(
    Repeater repeater, int startRecord, int maxRecord)
    {
        int totalRecord = 0;
        DataTable dataTable =
        sqlServerProvider.GetDataTable(startRecord, maxRecord);
        if (dataTable != null)
        {
            repeater.DataSource = dataTable;
            totalRecord = dataTable.Rows.Count;
        }
        else
            repeater.DataSource = null;
        repeater.DataBind();
        return totalRecord;
    }
}
